﻿#include <iostream>
class Object {
public:
    int data_0 = 1;
    int data_1 = 2;
    int data_2 = 3;
    int data_3 = 4;
};
class MoveObject:public Object {
    int data_0 = 1;
    int data_1 = 2;
public:
    int data_2 = 3;
    int data_3 = 4;
};
int main()
{
    MoveObject obj;
    int* nRead = (int*)&obj;
    std::cout << "OBJ内存地址：" << &obj << std::endl;
    for (int i = 0; i < sizeof(obj)/4; i++) {
        std::cout << "内存地址：" << &nRead[i] << "值：" << nRead[i] << std::endl;
    }
}